package com.xyc.mapper.impl;

import com.xyc.mapper.SongMapper;
import com.xyc.pojo.Song;
import org.mybatis.spring.support.SqlSessionDaoSupport;

import java.util.List;
import java.util.Map;

public class SongMapperImpl extends SqlSessionDaoSupport implements SongMapper {

    @Override
    public List<Song> selectSong() {
        return getSqlSession().getMapper(SongMapper.class).selectSong();
    }

    @Override
    public Song selectSongById(String id) {
        return getSqlSession().getMapper(SongMapper.class).selectSongById(id);
    }

    @Override
    public void addSong(Map map) {
        getSqlSession().getMapper(SongMapper.class).addSong(map);
    }

    @Override
    public void updateSong(Map map) {
        getSqlSession().getMapper(SongMapper.class).updateSong(map);
    }

    @Override
    public void deleteSong(String id) {
        getSqlSession().getMapper(SongMapper.class).deleteSong(id);
    }

    @Override
    public int selectSongCount() {
        return getSqlSession().getMapper(SongMapper.class).selectSongCount();
    }

    @Override
    public void updateLast(Map map) {
        getSqlSession().getMapper(SongMapper.class).updateLast(map);
    }
}
